<template>
	<view>
		<u-navbar title=" " leftIconSize="0" placeholder bgColor="transparent" :fixed="false">
			<view slot="left" class="nav_left" @click="goCity">
				<image class="location" src="/static/image/location.png"></image>
				<u-icon name="arrow-down-fill" labelSize="18" color="#231916" labelColor="#231916" :label="addressText"
					labelPos="left"></u-icon>
			</view>
			<view slot="center">
				<slot name="center"></slot>
			</view>
		</u-navbar>
	</view>
</template>

<script>
	import {
		mapGetters
	} from 'vuex'
	export default {
		name: "navbar",
		data() {
			return {

			};
		},
		computed: {
			...mapGetters(['addressText'])
		},
		methods: {
			goCity() {
				uni.$u.route('/pagesA/home/cityList');
			}
		}
	}
</script>

<style lang="scss">
	.nav_left {
		display: flex;
		align-items: center;

		.location {
			width: 30rpx;
			height: 33rpx;
			margin-right: 10rpx;
		}
	}
</style>
